package com.glory.brepda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.entity.EqpEntity;
import com.glory.brepda.entity.MaterielListEntity;

import java.util.List;

/**
 * FileName: MaterielListAdapter
 * Author: XJH
 * Date: 2020/5/27 16:54
 * Description:
 * History:
 */
public class MaterielListAdapter extends BaseQuickAdapter<EqpEntity.EquipmentlistBean, BaseViewHolder> {

    public MaterielListAdapter(@Nullable List<EqpEntity.EquipmentlistBean> data) {
        super(R.layout.item_materiel_list,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, EqpEntity.EquipmentlistBean item) {
        helper.setText(R.id.tvPosition,String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.tvMaterielName,item.getLocation());
        helper.setText(R.id.tvMaterielID,item.getStatusmodelrrn());
    }
}
